package com.start_eternity.oasissafewalk.mapper;
//记录操作的日志
import com.start_eternity.oasissafewalk.pojo.Logg;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface LoggMapper {

    //分页查询
    List<Logg> list(Integer id, LocalDate loggTime, String name);

    //记录操作日志
    @Insert("insert into logg(logg_time,logg_name,logg_description) values(#{loggTime},#{loggName},#{loggDescription})")
    void insert(Logg logg);

    //定期删除操作记录
    void delete(long time);

    //下载操作记录
    @Select("select *from logg where id = #{ids}")
    List<Logg> getAllData(List<Integer> ids);
}